﻿/**************************************************************
 *
 * 唯一标识：576766b7-cefc-421f-bc0c-470bb0df2508
 * 命名空间：Sgr
 * 创建时间：2023/7/20 21:17:42
 * 机器名称：DESKTOP-S0D075D
 * 创建者：antho
 * 电子邮箱：fengqinhua2016@163.com
 * 描述：
 *
 **************************************************************/

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;

namespace Sgr
{
    /// <summary>
    /// 常量定义
    /// </summary>
    public static class Constant
    {
        /// <summary>
        /// Unix 时间戳起始点：1970-01-01 00:00:00 UTC。
        /// </summary>
        public static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);

        /// <summary>
        /// 系统支持的最小业务时间：1900-01-01 01:01:01 UTC。
        /// </summary>
        public static readonly DateTime MinDateTime = new DateTime(1900, 1, 1, 1, 1, 1, DateTimeKind.Utc);

        /// <summary>
        /// 系统支持的最大业务时间：2999-01-01 01:01:01 UTC。
        /// </summary>
        public static readonly DateTime MaxDateTime = new DateTime(2999, 1, 1, 1, 1, 1, DateTimeKind.Utc);

        /// <summary>
        /// 实体的扩展属性最大长度
        /// </summary>
        public const int ExtendableObjectMaxLength = 2047;

        /// <summary>
        /// 缺省的组织标识
        /// </summary>
        public const long DEFAULT_ORGID = 19;

        /// <summary>
        /// 缺省的用户标识
        /// </summary>
        public const long DEFAULT_USERID = 19527;

        /// <summary>
        /// 系统超级管理员所在组织标识
        /// </summary>
        public const long SUPER_ADMIN_ORG_ID = 179;

        /// <summary>
        /// 超级管理员用户标识
        /// </summary>
        public const long SUPER_ADMIN_USER_ID = 399;

        /// <summary>
        /// 超级管理员用户名
        /// </summary>
        public const string SUPER_ADMIN_USER_NAME = "SgrAdmin";

        /// <summary>
        /// 超级管理员密码
        /// </summary>
        public const string SUPER_ADMIN_PASS_WORD = "admin@123";

        /// <summary>
        /// 超级管理员所属角色标识
        /// </summary>
        public const long SUPER_ADMIN_ROLE_ID = 279;

        /// <summary>
        /// 系统管理员所属角色标识
        /// </summary>
        public const long SYSTEM_ADMIN_ROLE_ID = 289;

        /// <summary>
        /// 普通用户所属角色标识
        /// </summary>
        public const long NORMAL_USER_ROLE_ID = 299;

        /// <summary>
        /// 缺省的身份令牌的唯一标识符
        /// </summary>
        public const string DEFAULT_JTI = "NULL";

        /// <summary>
        /// 缺省的数据源名称
        /// </summary>
        public const string DEFAULT_DATABASE_SOURCE_NAME = "SGR_DATABASE_SOURCE";

        /// <summary>
        /// JWT KEY 环境变量
        /// </summary>
        public const string SGR_JWT_KEY_ENV_VARIABLE = "SGR_JWT_KEY";

        //public const string Setup_SiteName = "SiteName";
        //public const string Setup_Language = "Language";
        //public const string Setup_AdminUsername = "AdminUsername";
        //public const string Setup_AdminUserId = "AdminUserId";
        //public const string Setup_AdminEmail = "AdminEmail";
        //public const string Setup_AdminPassword = "AdminPassword";
        //public const string Setup_DatabaseProvider = "DatabaseProvider";
        //public const string Setup_DatabaseConnectionString = "DatabaseConnectionString";
        //public const string Setup_DatabaseTablePrefix = "DatabaseTablePrefix";
        //public const string Setup_SiteTimeZone = "SiteTimeZone";

        /// <summary>
        /// 用户标识(来源于 JwtRegisteredClaimNames.Sub )
        /// </summary>
        public const string CLAIM_USER_ID = "sgr_user_id";

        /// <summary>
        /// 用户所属组织标识
        /// </summary>
        public const string CLAIM_USER_ORGID = "sgr_user_orgid";

        /// <summary>
        /// 在HttpContent中表示审计日志状态的标识Key
        /// </summary>
        public const string AUDITLOG_STATU_HTTPCONTEXT_KEY = "_SgrAuditLog";

        /// <summary>
        ///
        /// </summary>
        public const string SGR_ERRORHANDLE_HEADERNAME = "_Sgr-Error-Handle";

        /// <summary>
        ///
        /// </summary>
        public const string POWEREDBY_HEADERNAME = "_X-Powered-By";

        /// <summary>
        ///
        /// </summary>
        public const string POWEREDBY_HEADERVALUE = "sgr";

        /// <summary>
        /// 缺省密码
        /// </summary>
        public const string DEFAULT_PASS_WORD = "sgr@123";

        /// <summary>
        /// 验证码不正确或已过期的消息
        /// </summary>
        public const string INVALID_VERIFYCODE_MESSAGE = "验证码不正确或已过期";
    }
}